package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.ShoppingCart;
import com.sky.result.PriceAndNumber;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    /**
     * 添加购物车
     * */
    void add(ShoppingCart shoppingCart);

    PriceAndNumber selectNumber(ShoppingCart shoppingCart);


    void update(ShoppingCart shoppingCart);

    @Select("select * from shopping_cart where user_id=#{userId}")
    List<ShoppingCart> findAll(Long userId);

    void deleteOne(ShoppingCart shoppingCart);
}
